package cn.gbase.jiangsu.data.transfer.bean;

import java.sql.SQLException;

import org.nutz.dao.impl.NutDao;

import com.gbase.jdbc.jdbc2.optional.GBaseDataSource;

public class CreateDB {

	NutDao daoOut = new NutDao();
	GBaseDataSource dsOut = null;

	private void setOutDataSource() {
		dsOut = new GBaseDataSource();

		// 更新连接信息
		dsOut.setServerName("localhost");
		dsOut.setDatabaseName("shop");
		dsOut.setUser("sysdba");
		dsOut.setPassword("1");

		// 设置数据源
		daoOut.setDataSource(dsOut);
	}
	
	
	private void doWork() throws SQLException{
		setOutDataSource();
		
		daoOut.create(Supplier.class, false);

	}

	public static void main(String[] args) {
		CreateDB xx = new CreateDB();
		try {
			xx.doWork();
		} catch (SQLException e) {
			e.printStackTrace();
		}
	}

}
